package test;

public class Customer implements Comparable<Customer>{
	public int id;
	public int age;
	public String name;
	
	@Override
	public int compareTo(Customer o) {
		
		return this.id-o.id;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + age;
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Customer other = (Customer) obj;
		if (age != other.age)
			return false;
		return true;
	}
	
	
}
